//
//  Util.h
//  TestCach
//
//  Created by 钮勇威 on 16/2/19.
//  Copyright © 2016年 阿毛. All rights reserved.
//

#import <Foundation/Foundation.h>


//----------------宏定义----------------
//网络状况更新
#define NETWORKUPDATE @"NETWORKUPDATE"
//userdefault保存字符串
#define USERINFO @"USERINFO"


@interface Util : NSObject

/**
 *  格式化请求URL
 *
 *  @param dic  所有参数
 *
 *  @return 添加v的dictionary
 */
+(NSDictionary *)getDictionaryUrl:(NSDictionary *)dic;
/**
 *  字符串转NSDictory
 *
 *  @param jsonString 输入的json
 *
 *  @return 返回dic
 */
//+ (NSDictionary *)dictionaryWithJsonString:(NSString *)jsonString;


/**
 *  NSDictory转字符串
 *
 *  @param dic <#dic description#>
 *
 *  @return <#return value description#>
 */
+ (NSString*)dictionaryToJson:(NSDictionary *)dic;


//检查文本框是否为空
+(BOOL)checkTextField:(UIView *)view;
//nav设置
+ (NSDictionary *)getNavigationBarTitleTextAttributes;
//tabBar设置
+ (UIBarButtonItem *)addBarButtonItemWithImage:(NSString *)imageName
                                highlightImage:(NSString *)highlightImageName
                                        target:(id)target
                                  action:(SEL)action;

   //判断是否为空   
+(BOOL)isNull:(NSString *)inputStr;

//存储全局变量
+(BOOL)addSessionId:(NSString *)sessionId;

+(NSString *)getSessionId;


+(BOOL)addUserId:(NSString *)userId;

+(NSString *)getUserId;



@end
